<?php defined('ROOT_DIR') or die('Access denied!');?>
<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="content-type" content="text/html" />
	<meta name="author" content="暮雨秋晨" />
	<meta charset="UTF-8" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
    <meta name="description" content="<?php echo $config['desc'];?>" />
    <meta name="keywords" content="<?php echo $config['keywd'];?>" />
	<title><?php echo $title;?></title>
    <link rel="stylesheet" href="/Application/static/css/main.css" />
    <script src="/Application/static/js/common.js"></script>
</head>
<body>
<header>
<ul>
<li><a href="<?php echo $this->urlCreate('admin','index');?>" style="z-index: 50;">管理主页</a></li>
<li><a href="#" style="z-index: 49;">版块管理</a></li>
</ul>
</header>

<div id="main">
<div id="subtitle"><?php echo $forum['name'];?> - 版块管理</div>
<?php if(!empty($sections)):?>
<ol style="display: block;margin: 1em 2em 1em;">
<?php foreach($sections as $section):?>

<li><?php echo $section['name'];?>&nbsp;[ <a href="<?php echo $this->urlCreate('admin','topic',array('id'=>$section['id']));?>">管</a> | <a href="<?php echo $this->urlCreate('admin','section_delete',array('id'=>$section['id']));?>" onclick="return confirm('确定删除？');">删</a> | <a href="<?php echo $this->urlCreate('admin','section_change',array('id'=>$section['id']));?>">改</a> ]</li>

<?php endforeach;?>
</ol>
<?php else:?>

<div style="font: 1.2em;color: #EE7700;margin: 1em 2em 1em;">暂无版块</div>

<?php endif;?>
<div id="subtitle">增加版块</div>
<div id="box">
<form action="" method="post">
<label for="name">版块名称</label>
<input type="text" id="name" name="name" style="margin: 1em;display: block;" />
<span style="display: block;margin: 3px 1em 3px;color: red;"><?php echo $tip;?></span>
<input type="submit" name="submit" value="提交" style="margin: 1em;display: block;width: 64px;height: 24px;margin-left: 3em;" />
</form>
</div>
</div>
<footer>
&copy;<a href="http://www.doubear.com">Doubear</a> Driven by <a href="http://www.domvc.com">DoMVC</a> framework
</footer>
</body>
</html>